<template>
  <div>
    <Count/>
    <br>
    <MyHeader ref="box"/>
    <button @click="addBox">获取组件上的ref</button>
  </div>
  
</template>

<script>
import Count from './components/Count';
import MyHeader from './components/MyHeader'
export default {
name:'App',
components:{
  Count,
  MyHeader
},
methods: {
  addBox(){
    console.log(this);
    console.log(this.$refs.box);
  }
},
}
</script>

<style>

</style>